define(['jq'],function(){
    class Self {
        constructor() {
            this.imp = document.querySelector('.imp')
            this.creat()
            this.getmes()
        }
        getmes() {
            return JSON.parse(localStorage.getItem('abc')) || []
        }
        creat() {
            var arr=this.getmes()
            console.log(arr)
            var str=
            this.str=''
               this.str += `
               <div class="wrap">
               <div class="smallBox">
                   <img src="${arr[0].url}">
                   <span></span>
               </div>
               <div class="bigBox">
                   <img src="${arr[0].url}">
               </div>
           </div>
           <div class="name">
               <p>${arr[0].title}</p>
               <div class="pf">
                   <span>评分:${arr[0].point}分</span>
                   <div class="num">
                       <span class="iconfont icon-18erji-2"></span>
                        <span> ${arr[0].num}</span>
                      </div>
               </div>
               <div class="btn">
                   <button type="text" class="b1">6元开会员，免费听</button>
                   <button type="text" class="b2">购买 | ${arr[0].price}喜点</button>
               </div>
           </div>
                `
            
            // this.str=this.str+'</ul>'
            this.imp.innerHTML=this.str
        }
    }
    new Self()
    $('.fhui').click(function(){
        console.log(6666666)
        location.href='../html/pindao.html'
        
    })
});